<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>跑马灯</title>
</head>
<body>

<div id="app">
    //数组
    <table>
        <tr v-for="(user,index) in users">
            <td>{{index}}</td>
            <td>{{user.name}}</td>
            <td>{{user.gender}}</td>
            <td>{{user.age}}</td>
        </tr>
    </table>


    //对象
    <table>
        <tr v-for="(v,k,i) in user">
            <td>{{v}}</td>
            <td>{{k}}</td>
            <td>{{i}}</td>
        </tr>
    </table>

    //字符串
    <span v-for="a in 'asdgasgfkj'">
        {{a}},
    </span>

    //常量
    <span v-for="a in 45">
        {{a}}

    </span>


</div>


<script src="./node_modules/vue/dist/vue.js"></script>
<script>


</script>
<script>
    new Vue({
        el: "#app",
        data: {
            users: [
                {name: '柳岩', gender: '女', age: 21},
                {name: '有哥', gender: '男', age: 30},
                {name: '范冰冰', gender: '女', age: 24},
                {name: '刘亦菲', gender: '女', age: 18},
                {name: '古力娜扎', gender: '女', age: 25}
            ],
            user:  {name: '柳岩', gender: '女', age: 21},

        },


    })


</script>


</body>
</html>